package com.example.exam.sysRoleResourcePermission.service;

import com.example.exam.sysRoleResourcePermission.dao.SysRoleResourcePermissionDao;
import com.example.exam.sysRoleResourcePermission.entity.SysRoleResourcePermissionBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysRoleResourcePermissionService {

	@Autowired
	private SysRoleResourcePermissionDao sysRoleResourcePermissionDao;
	/**
	 * @Description:
	 * @Param: [roleId, resourceId, permissionId]
	 * @return: com.example.exam.sysRoleResourcePermission.entity.SysRoleResourcePermissionBean
	 * @Author: xhw
	 * @Date: 2021/7/26
	 */
	public SysRoleResourcePermissionBean queryDataByRrp(String roleId, Integer resourceId, Integer permissionId) {
		return sysRoleResourcePermissionDao.queryDataByRrp(roleId, resourceId, permissionId);
	}/**
	 * @Description:
	 * @Param: [srrp]
	 * @return: int
	 * @Author: xhw
	 * @Date: 2021/7/26
	 */
	public int saveData(SysRoleResourcePermissionBean srrp){
		return sysRoleResourcePermissionDao.add(srrp);
	} /**
	 * @Description:
	 * @Param: [roleId, resourceId, permissionId]
	 * @return: int
	 * @Author: xhw
	 * @Date: 2021/7/26
	 */
	public int delDataByRoleId(Integer roleId,Integer resourceId,Integer permissionId) {
		return sysRoleResourcePermissionDao.delDataByRoleId(roleId,resourceId,permissionId);
	}
}
